/**
 * 
 */
package visualization.singleview;

import java.awt.Graphics;

import javax.swing.JInternalFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import dataTypes.ISequenceData;

/**
 * @author Christian
 * 
 */
public class SingleSequenceView extends JInternalFrame {
	private static final long serialVersionUID = 339371645637669768L;

	JTabbedPane sequenceTabs;

	ISequenceData sequenceData;

	public SingleSequenceView(ISequenceData sequenceData) {
		super(sequenceData.getSeqName(), true, // resizable
				true, // closable
				true, // maximizable
				true);// iconifiable

		this.setSize(320, 240);

		this.setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);
		this.setVisible(true);

		sequenceTabs = new JTabbedPane();

		JPanel windowOverviewPanel = new WindowSizePanel(sequenceData);
		windowOverviewPanel.repaint();
		windowOverviewPanel.setVisible(true);
		sequenceTabs.add("Window size overview", windowOverviewPanel);

		JPanel dynamicWindowPanel = new DynamicWindowPanel(sequenceData);
		sequenceTabs.add("Dynamic window overview", dynamicWindowPanel);

		JPanel sequenceLengthPanel = new CutPanel(sequenceData);
		sequenceTabs.add("Length after cutting", sequenceLengthPanel);

		sequenceTabs.setVisible(true);
		this.add(sequenceTabs);
	}

	public void paintComponent(Graphics g) {
		super.repaint();
	}
}
